import { Pagination as AntPagination } from 'antd';
import React from 'react';
import { useConfig } from '../ConfigProvider';
import { PaginationComponent } from './interface';
import './style.less';


const Pagination: PaginationComponent = (props) => {
  const { antNative, ...restProps } = props;
  const { antNative: globalAntNative } = useConfig();

  if (antNative || globalAntNative) {
    return <AntPagination {...restProps} />;
  }

  return  <AntPagination {...restProps}/>
};

export default Pagination; 